import { _decorator, Animation, AnimationClip, Component, Node, SpriteFrame } from 'cc';
import State from './State';
import { FSM_PARAMS_TYPE_ENUM } from '../Enums';
import { StateMachine } from './StateMachine';

const { ccclass, property } = _decorator;

@ccclass('subStateMachine')
export abstract class subStateMachine {
    private _currentState: State = null;

    statMachines: Map<string, State> = new Map();

    constructor(public fsm: StateMachine) {

    }




    get currentState() {
        return this._currentState;
    }

    set currentState(newState: State) {
        this._currentState = newState;
        this._currentState.run();
    }




    abstract run(): void;







}


